package com.java.business.jxc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.java.business.jxc.bean.B_SUPPLIER;
import com.java.business.jxc.dao.SupplierMapper;
import com.java.core.utils.IdUtils;

@Transactional
@Service
public class SupplierService {

	@Autowired
	private SupplierMapper mapper;

	public void add(B_SUPPLIER supplier) {
		supplier.setSupplier_id(IdUtils.uuid());
		mapper.add(supplier);
	}

	public void update(B_SUPPLIER supplier) {
		mapper.update(supplier);
	}

	public void setDisabled(B_SUPPLIER supplier) {
		mapper.setDisabled(supplier);
	}

	public void delete(String supplier_id) {
		mapper.delete(supplier_id);
	}

	public B_SUPPLIER getSupplierById(String supplier_id) {
		return mapper.getSupplierById(supplier_id);
	}

	public List<B_SUPPLIER> getSupplierList(B_SUPPLIER supplier) {
		return mapper.getSupplierList(supplier);
	}
}
